<template>
	<!-- 重抽卡 -->
	<view>
		<!-- #ifdef APP-PLUS -->
		<view class="status_bar"></view>  
		<!-- #endif -->
		<navbar title="重抽卡" />
		<view class="list">
			<noData v-if="againcouponList.length === 0" />
			<view class="main" v-for="(item,index) in againcouponList" :key="index">
				<image src="/static/images/againcoupon.png"></image>
				<view class="title">{{item.name}}</view>
				<view class="text">{{item.activity_name}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page:1,
				againcouponList:[]
			}
		},
		onLoad() {
			this.getMyagaincoupon();
		},
		onPullDownRefresh() {
			this.page++;
			this.getMyagaincoupon();
		},
		methods: {
			//获取我的重抽卡列表
			getMyagaincoupon(){
				this.$api.myagaincoupon({
					type:1,
					offset:this.page
				}).then(res=>{
					this.againcouponList = this.againcouponList.concat(res);
				})
			}
		}
	}
</script>

<style lang="scss">
page{
	padding: calc(var(--status-bar-height) + 100rpx) 0 30rpx;
}
.list{
	margin: 30rpx 0;
	display: flex;
	flex-wrap: wrap;
	
	.main{
		background: #FBFBFB;
		
		image{
			width: 375rpx;
			height: 518rpx;
		}
		.title{
			font-size: 28rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: bold;
			color: #000000;
			margin: 15rpx 10rpx;
			@include one;
			text-align: center;
		}
		.text{
			font-size: 24rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			margin: 10rpx 15rpx;
			@include one;
			text-align: center;
		}
	}
}
</style>
